#if !defined(NETSERVER_H)
#define NETSERVER_H
#include "globaldef.h"

const int MAXBUFFSIZE = 128;

class NetServer
{
private:
    char sendBuff[MAXBUFFSIZE] = {'\0'};
    char recvBuff[MAXBUFFSIZE] = {'\0'};
    int clientSocket;
    int _x;
    int _y;

public:
    bool init();
    void prepareToStart(XCY::PrepareStart &pInfo);
    bool readBuff();
    bool writeBuff();
    void parseBuff(XCY::NetPacket&);
    void packBuff(const XCY::NetPacket&);
    int getX();
    int getY();
};


#endif //NETSERVER_H
